<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>


<logic:notPresent name="userName" scope="session">
	<logic:redirect forward="login"></logic:redirect>
</logic:notPresent>

<logic:notEqual name="userName" scope="session" value="admin">
	<logic:redirect forward="login"></logic:redirect>
</logic:notEqual>

<logic:equal name="userName" scope="session" value="admin">
	<logic:present name="info" scope="request">
		<font color="red"><bean:write name="info" scope="request" /> </font>
	</logic:present>
	<html:form action="/editUserSubmit" focus="nickName">
		<table>
			<tr>
				<td>
					用户昵称 :
				</td>
				<td>
					<bean:write name="userinfo" property="nickName" />
					<html:hidden name="userinfo" property="nickName" />
					<html:errors property="nickName" />
				</td>
			</tr>

			<tr>
				<td>
					密码 :
				</td>
				<td>
					<html:password name="userinfo" property="password" />
					<html:errors property="password" />
				</td>
			</tr>

			<tr>
				<td>
					真名 :
				</td>
				<td>
					<html:text name="userinfo" property="trueName" />
					<html:errors property="trueName" />
				</td>
			</tr>

			<tr>
				<td>
					性别 :
				</td>
				<td>
					<html:radio name="userinfo" property="sex" value="0" />
					男
					<br />
					<html:radio name="userinfo" property="sex" value="1" />
					女
					<br />
					<html:errors property="sex" />
				</td>
			</tr>

			<tr>
				<td>
					年龄 :
				</td>
				<td>
					<html:text name="userinfo" property="age" />
					<html:errors property="age" />
				</td>
			</tr>

			<tr>
				<td>
					联系地址 :
				</td>
				<td>
					<html:text name="userinfo" property="contact" />
					<html:errors property="contact" />
				</td>
			</tr>

			<tr>
				<td>
					特长 :
				</td>
				<td>
					<html:text name="userinfo" property="capability" />
					<html:errors property="capability" />
				</td>
			</tr>

			<tr>
				<td>
					工作年限 :
				</td>
				<td>
					<html:text name="userinfo" property="workYear" />
					<html:errors property="workYear" />
				</td>
			</tr>

			<tr>
				<td>
					初始积分 :
				</td>
				<td>
					<html:text name="userinfo" property="startPoint" />
					<html:errors property="startPoint" />
				</td>
			</tr>

			<tr>
				<td>
					推荐人 :
				</td>
				<td>
					<html:text name="userinfo" property="recommander" />
					<html:errors property="recommander" />
					<font color="red">注：填写推荐人用户昵称</font>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					
					<html:submit value="修改" />
				</td>
			</tr>
		</table>
	</html:form>



</logic:equal>
